package com.weslide.weslideapp.fragment;

import com.weslide.weslideapp.R;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

public class ExchangeSuccessFragment extends WeSlideFragment {
	private static final String TAG = "ExchangeSuccessFragment";
	private ImageView mImgVback;
	private TextView mTvOrderId;
	private TextView mGoodsName;
	private Button mBtnExchangeRecord;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		globalView = inflater.inflate(R.layout.page_exchange_success,
				container, false);
		findViews();
		init();
		return globalView;
	}

	private void findViews() {
		mImgVback = (ImageView) findViewById(R.id.page_exchange_success_mImgVBack);
		mTvOrderId = (TextView) findViewById(R.id.page_exchange_success_mTvOrderId);
		mGoodsName = (TextView) findViewById(R.id.page_exchange_success_mTvGoodName);
		mBtnExchangeRecord = (Button) findViewById(R.id.page_exchange_success_mBtnExchangeRecord);
		mImgVback.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				getActivity().onBackPressed();
			}
		});
	}

	private void init() {
		Bundle bundle = getArguments();
		String seId = bundle.getString("seId");
		String goodName = bundle.getString("goodName");
		mTvOrderId.setText(seId);
		mGoodsName.setText(goodName);
	}
}
